import http from "@/utils/request";
//封装项目的请求
/*  用户相关的请求  */


// 用户注册
function userRegRequest(userName, password,result,age,avatar,area,address,nickName,gender){
    return http({
     method: "post",
     url: "/api/v1/auth/reg",
     data: {userName,password,result,age,avatar,area,address,nickName,gender },
    })
 }


// 用户登录
function userloginRequest(userName, password){
    return http({
     method: "post",
     url: "/api/v1/auth/login",
     data: {userName,password },
    })
 }

 function infoRequest(token) {
    return http({
      method: 'get',
      url: '/api/v1/user/info',
      headers: { token },
    });
  }

 
 export{userRegRequest,userloginRequest,infoRequest}